package com.wwj.study.interview.chapter5;

/**
 * @Author: wuweijun
 * @Date: 2018/12/18 15:45
 */
public class ThreadJoinTest {
    public static void main(String[] args) throws InterruptedException {
        Thread thread1 =new Thread(){
            @Override
            public void run() {
                System.out.println(1);
            }
        };

        Thread thread2 =new Thread(){
            @Override
            public void run() {
                System.out.println(2);
            }
        };

        Thread thread3 =new Thread(){
            @Override
            public void run() {
                System.out.println(3);
            }
        };

        thread1.start();
        thread1.join();
        thread2.start();
        thread1.join();
        thread3.start();
    }
}
